<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>会员中心</title>

<link href="./css/style.css" rel="stylesheet" type="text/css" />
<link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="./js/jquery.js"></script>
<script type="text/javascript" src="./js/bootstrap.min.js"></script>
<script>
$(function(){
    $('.loginbox').css({'position':'absolute','left':($(window).width()-692)/2});
	$(window).resize(function(){  
    	$('.loginbox').css({'position':'absolute','left':($(window).width()-692)/2});
   	});
});  	

function login(){
    var mobile = $(".loginuser").val();
    var password = $(".loginpwd").val();
    var parameter = {mobile:mobile,password:password};
	try{
	    $.ajax({
	        url: '/euc/_user/login',
	        data:parameter,
	        dataType: 'JSON',
	        async: false,
	        contentType:'application/x-www-form-urlencoded',
	        type: 'POST',
	        success: function(data, textStatus, response) {
		        localStorage.setItem('memberToken',data.data.token);
		        localStorage.setItem('memberDeptId',data.data.member.deptId);
		        localStorage.setItem('memberCompanyName',data.data.member.companyName);
		        localStorage.setItem('memberAdmin',data.data.member.isAdmin);
		        localStorage.setItem('memberSpaceId',data.data.member.spaceId);
		        localStorage.setItem('memberId',data.data.member.id);
		        localStorage.setItem('memberName',data.data.member.name);
		        window.location.href="/euc/center/member/main"
	        },
	        error: function () {
	            alert("error");
	        }
	    });
	
	}
	catch(e){
	    alert(e.message);
	}
}


</script>
</head>
<body style="background-color:#1c77ac; background-image:url(images/light.png); background-repeat:no-repeat; background-position:center top; overflow:hidden;">



    <div id="mainBody">
      <div id="cloud1" class="cloud"></div>
      <div id="cloud2" class="cloud"></div>
    </div>  


<div class="logintop">    
    </div>
    
    <div class="loginbody">
    
    <span class="systemlog  o"></span> 
       
    <div class="loginbox">
    
    <ul>
    <li><input name="" type="text" class="loginuser" value="" onclick="JavaScript:this.value=''"/></li>
    <li><input name="" type="password" class="loginpwd" value="" onclick="JavaScript:this.value=''"/></li>
    <li><input name="" type="button" class="loginbtn" value="登录"  onclick="login()"  />
    </li>
    </ul>
    
    
    </div>
    
    </div>
    
</body>
</html>